Next | Prev | Up | Top | Contents | Index
Coding Assumptions to Avoid
Most porting problems come from assumptions, implicit or explicit, about either absolute or relative sizes of the int, long int, or pointer types in code.
To avoid porting problems, examine code that assumes:
- sizeof(int) == sizeof(void *)
-
- sizeof(int) == sizeof(long)
-
- sizeof(long) == 4
-
- sizeof(void *) == 4
-
- Implicitly Declared Functions
-
- Constants With the High-Order Bit Set
-
- Arithmetic with long Types
-
- Solving Porting Problems
-
Next | Prev | Up | Top | Contents | Index